<?php

$phar_file=$argv[1];

if (file_exists($phar_file)) {
	echo "\n* Removing old $phar_file";
	unlink($phar_file);
}
echo "\n* Creating $phar_file file.";
$phar = new Phar($phar_file);
$phar->compressAllFilesGZ();

print_r($phar);
for ($i=2; $i<count($argv); $i++) {
	echo "\n* adding $phar_file <= ".$argv[$i];
	$phar->addFile($argv[$i]); 
}
?>
